package builder.v2;

/**
 * Created by Administrator on 2022/9/29.
 * 建造这模式中的具体建造者ConcreteBuilder
 */
public class Director {
    protected HouseBuilder builder;

    House construct() {
//        builder.buildBase();
//        builder.buildWall();
//        builder.buildRoof();
        return builder.buildHouse();
    }

    //带参数的构造方法

    public Director(HouseBuilder builder) {
        this.builder = builder;
    }

    public Director() {
    }
    //SetBuilder

    public void setBuilder(HouseBuilder builder) {
        this.builder = builder;
    }
}
